# -*- coding: utf-8 -*-
import sys
from sys import path
from os.path import dirname
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QApplication
from client.widget import MainForm

path.append(dirname(__file__))

def main():
    app = QApplication(sys.argv)
    # 处理高清屏显示问题
    dpi = (app.screens()[0]).logicalDotsPerInch()
    # print("dpi %s" % str(dpi))
    if dpi > 96.0:
        del app
        QApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
        app = QApplication(sys.argv)
        font = app.font()
        font.setPointSize(10)
        app.setFont(font)

    m = MainForm()
    sys.exit(app.exec_())